#include <arch.h>
#include <cpu.h>
#include <plat.h>
#include <wfi.h>
#include <arch/arm_mpu.h>

/* mpidr_el1的定义cortex-a/r的每个处理器都会不同(affinity)，且需考虑多个cluster */
uint64_t cpu_id_to_mpidr(uint64_t id)
{

}

int64_t cpu_mpidr_to_id(uint64_t mpidr)
{
}

void cpu_arch_init(void)
{
    uint64_t val;

    arm_mpu_init();

    /* Enable floating point */
    val = MRS(cpacr);
    val |= CPACR_FPEN(CPACR_FP_TRAP_NONE);
    MSR(cpacr, val);
}

void cpu_arch_idle(void)
{
    while(1)
        wfi();
}
